let path = {
	init: function () {
		this.cookieToPath();
		setInterval(function () {
			this.pathToCookie();
		}.bind(this), 1000);
	},
	/**
	 * 数据同步   path-->cookie
	 * @return {[type]} [description]
	 */
	pathToCookie: function () {
		for (let key in path) {
			if (typeof path[key] == 'string') {
				let url = path[key];
				if (url) {
					store.set('path_' + key, url);
				}
			}
		}
	},
	/**
	 * 数据同步   cookie-->path
	 * @return {[type]} [description]
	 */
	cookieToPath: function () {
		for (let key in path) {
			if (typeof path[key] == 'string') {
				let url = store.get('path_' + key);
				if (url) {
					path[key] = url;
				}
			}
		}
	},
	set: function (data) {
		for (let key in data) {
			store.set('path_' + key, data[key]);
			path[key] = data[key];
		}
		return true;
	},
	get: function (key) {
		let url = store.get('path_' + key);
		if (!url) {
			url = path[key];
		}
		return url;
	}
};
path.init();